package cn.tqfeiyang.smartadmin.system.request;

import cn.tqfeiyang.smartadmin.commons.pagination.QueryParams;
import cn.tqfeiyang.smartadmin.commons.pagination.QueryColumn;
import cn.tqfeiyang.smartadmin.commons.pagination.QueryLogic;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * description
 *
 * @author tqfeiyang
 * @since 2024/8/20 13:53
 */
@Data
public class RoleQueryDTO extends QueryParams {

    /**
     * 搜索关键字
     */
    @Schema(description = "搜索关键字", example = "")
    @QueryColumn(column = "code,name", logic = QueryLogic.like)
    private String keywords;

    /**
     * 编码
     */
    @Schema(description = "编码")
    @Length(max = 50, message = "编码不能超过50个字符")
    @QueryColumn(logic = QueryLogic.like)
    private String code;

    /**
     * 角色名称
     */
    @Schema(description = "名称")
    @Length(max = 80, message = "名称不能超过80个字符")
    @QueryColumn(logic = QueryLogic.like)
    private String name;

}
